package com.zhu.designpatterns.creational.builder;

import lombok.Data;

/**
 * @author ZhuXinYe
 * @date 2022/8/29 22:33
 * @description 指挥者：调用具体建造者来创建复杂对象（产品）的各个部分，并按照一定顺序（流程）来建造复杂对象。
 **/
@Data
public class Director {
    public Car create(Builder builder) {
        builder.buildDoor();
        builder.buildWheel();
        builder.buildWindow();
        builder.buildEngine();
        return builder.getCar();
    }
}
